//
//  BQNewsCell.m
//  BeeQuick
//
//  Created by Vivitickey on 2017/4/26.
//  Copyright © 2017年 test. All rights reserved.
//

#import "BQNewsCell.h"
#import "UIColor+HMAddition.h"
#import <UIImageView+WebCache.h>
#import <Masonry.h>
#import "BQHomeModel.h"
@interface BQNewsCell ()

@property (nonatomic,weak) UIImageView *imageView;

@end


@implementation BQNewsCell

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    
    return self;
    
}

-(void)setupUI{
    
    UIImageView *imageView = [[UIImageView alloc]init];
    
    _imageView = imageView;
    
    [self.contentView addSubview:imageView];
    
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0);
    }];  
}
-(void)setModel:(BQHomeModel *)model{
    
    _model = model;
    
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:model.img]];
    
}
@end
